import requests, json, re, replace
from pydantic import BaseModel
from bs4 import BeautifulSoup
import datetime


def seazen_session():
    url = "https://auth.xincheng.com/LoginService.ashx"
    payload = 'challengeNumber=&hidetxtPassword=FUsL7oXCRkg8JNPYjUIBuyfeNWHZEemjGE95bPemumbvfSFC%2F7eizfzJFINIltGsvdn9PESs1eW4kPhcyp0G%2BqWqSydvOwYPKGvD%2FVw4orcO0%2FaDeT5vgMsBqaYB%2FH3%2F8EWR4ePV7uueh97O8U4W2JAWp%2FggPH3Z2FckSxLrIoGxMze0FPozeJQ%2B%2FXsBmdnLJj0C%2B5vEBnsG1%2FP2vCFpSqMWx9aVveTjxg3rPVgpSmy13TTNHVk44IOif6nyWSFpRQev8uOnTRkixR2BPh1wEmR4ynt6YwD5pPgy0jou0cf%2FfsSGjqy9fBP2S8yT1fgLmDnBqynAAN4Jk5ko%2BkSuZw%3D%3D&lang=en-us&randomDate=2021-05-09%2020%3A28%3A13&rememberPassword=false&systemCode=&txtIsTrustAccessor=True&txtUserName=wangrui20&txtVerificationCode='
    headers = {
        'sec-ch-ua': '" Not A;Brand";v="99", "Chromium";v="90", "Microsoft Edge";v="90"',
        'Accept': 'application/json, text/javascript, */*; q=0.01',
        'X-Requested-With': 'XMLHttpRequest',
        'sec-ch-ua-mobile': '?0',
        'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36 Edg/90.0.818.49',
        'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
        'Sec-Fetch-Site': 'same-origin',
        'Sec-Fetch-Mode': 'cors',
        'Sec-Fetch-Dest': 'empty'
    }
    session = requests.session()
    session.post(url, headers=headers, data=payload)
    req = session.get(url="https://oasis-wd.xincheng.com/crems/")
    soup = BeautifulSoup(req.text, "html.parser")
    SAMLResponse = soup.find("form").find("div").find_all("input")[0].get("value")
    RelayState = soup.find("form").find("div").find_all("input")[1].get("value")
    url2 = "https://oasis-wd.xincheng.com/sap/saml2/sp/acs/800"
    payload2 = 'RelayState=' + RelayState + '&SAMLResponse=' + SAMLResponse
    session.post(url2,data=payload2)
    session.get(url="https://oasis-wd.xincheng.com/crems/")
    return session


class prin_ci_pal(BaseModel):
    '''
    楼层负责人信息
    '''
    One = "寇川川/朱文雅"
    Two = "王姿颖/刘峰"
    Three = "李翔/张文艳"
    Four = "王丁丁/苏畅"


def contract_warning():
    '''
    获取即将到期合同的数据
    :return:
    '''
    url = "https://oasis-wd.xincheng.com/sap/opu/odata/sap/ZSRE_027N_SRV/$batch?sap-client=800"
    payload = "\r\n--batch_5360-5f01-a363\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nGET ZCSRE_I_RECONALIST?sap-client=800&$skip=0&$top=55&$orderby=last_changed%20desc&$filter=(kstatus%20eq%20%2760%27%20or%20kstatus%20eq%20%2730%27)%20and%20zprojid%20eq%20%27E041601%27&$select=objbkey%2crecnnr%2crecntype%2ckcatg%2ckcatgtxt%2cref_version%2cversion%2czprojid%2czprojnm%2czcount%2ckstatus%2cronumber%2ckpage%2cronumberstr%2cact_rtarea%2ckstatustxt%2cbrandname%2cfull_name%2csdate%2cedate%2cname_org1%2cappdat%2ccanchg%2curl%2cmonthup02%2cmonthup01%2clast_changed%2cpstatustxt%2cpstatus%2ccantext%2ccanprint%2ccanedit%2cpobjkey%2csynccpts%2cchg_active_date%2cterminate_date HTTP/1.1\r\nsap-cancel-on-close: true\r\nsap-contextid-accept: header\r\nAccept: application/json\r\nAccept-Language: zh-Hans\r\nDataServiceVersion: 2.0\r\nMaxDataServiceVersion: 2.0\r\nx-csrf-token: hVfLgVGewkoIMiwjmd5hTg==\r\n\r\n\r\n--batch_5360-5f01-a363\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nGET ZCSRE_I_RECONALIST/$count?sap-client=800&$filter=(kstatus%20eq%20%2760%27%20or%20kstatus%20eq%20%2730%27)%20and%20zprojid%20eq%20%27E041601%27 HTTP/1.1\r\nsap-cancel-on-close: true\r\nsap-contextid-accept: header\r\nAccept: text/plain, */*;q=0.5\r\nAccept-Language: zh-Hans\r\nDataServiceVersion: 2.0\r\nMaxDataServiceVersion: 2.0\r\nx-csrf-token: hVfLgVGewkoIMiwjmd5hTg==\r\n\r\n\r\n--batch_5360-5f01-a363--\r\n"
    headers = {
        'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36 Edg/90.0.818.49',
        'Content-Type': 'multipart/mixed;boundary=batch_5360-5f01-a363',
        'cookie':'UM_distinctid=178d9aeaf17645-0c2767b0ad2d76-18473f15-13c680-178d9aeaf1820; PS_DEVICEFEATURES=width:1680 height:1050 pixelratio:2 touch:0 geolocation:1 websockets:1 webworkers:1 datepicker:1 dtpicker:1 timepicker:1 dnd:1 sessionstorage:1 localstorage:1 history:1 canvas:1 svg:1 postmessage:1 hc:0 maf:0; fm-vip-lock={"ef6b891c87fa4227ba10a39f4a4d144f-1-0-0":15785696}; MYSAPSSO2=AjQxMDMBABhYAEMAMAAwADkAMQAyADAAMgAgACAAIAACAAY4ADAAMAADABBTADQAUAAgACAAIAAgACAABAAYMgAwADIAMQAwADUAMAA5ADEAMgAyADgABQAEAAAACAkAAjEA%2fwD9MIH6BgkqhkiG9w0BBwKggewwgekCAQExCzAJBgUrDgMCGgUAMAsGCSqGSIb3DQEHATGByTCBxgIBATAaMA4xDDAKBgNVBAMTA1M0UAIICiAgEhAIMwEwCQYFKw4DAhoFAKBdMBgGCSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTIxMDUwOTEyMjgwN1owIwYJKoZIhvcNAQkEMRYEFHe9erXCOai8xwlCws8WsQ22GqKcMAkGByqGSM44BAMEMDAuAhUAh4neOV7TshVSRbZa0coFGbRRNNICFQDm9ZTLCJvFlzSfHKbXNYm81oMeiQ%3d%3d; sap-usercontext=sap-language=ZH&sap-client=800; sso_user=7CjToxIA1QqCSFP9+BDEYHRxS7cp1WxKwWUxJZ9xFy8KSWVQSTPqeA==; sap-login-XSRF_S4P=20210510053453-S50Gv2dkTWVE43nMKq4aew%3d%3d; SPNegoTokenRequested=2021-05-10%2005%3a35%3a20; sap-ssolist=O3I9c2FwLXM0LWFwMl9TNFBfMDBfODAwXzMyQTdGMjk0QTE2OUQyQTY1RUY0QzVGNTVBRTZENUY4NDRBNDk5MTk7cj1zYXAtczQtYXAzX1M0UF8wMF84MDBfMzJBN0YyOTRBMTY5RDJBNjVFRjRDNUY1NUFFNkQ1Rjg0NEE0OTkxOTtyPXNhcC1zNC1hcDRfUzRQXzAwXzgwMF8zMkE3RjI5NEExNjlEMkE2NUVGNEM1RjU1QUU2RDVGODQ0QTQ5OTE5O3I9c2FwLXM0LWFwMV9TNFBfMDBfODAwXzMyQTdGMjk0QTE2OUQyQTY1RUY0QzVGNTVBRTZENUY4NDRBNDk5MTk%3d; ehr-8000-PORTAL-PSJSESSIONID=K7NUzfuOUAbbTYQW7mvWcLiW2cb_8NCv!2043754032; ExpirePage=http://ehr.xincheng.com:8000/psc/HR92PRD/; PS_LOGINLIST=http://ehr.xincheng.com:8000/HR92PRD; PS_TOKEN=qwAAAAQDAgEBAAAAvAIAAAAAAAAsAAAABABTaGRyAk4Acwg4AC4AMQAwABQfjKdSpIOPIZRv0cq9qK52pBv3OGsAAAAFAFNkYXRhX3icHYk7DkBQEEXPQ5QK+3jiG28FohRUGlGJRkHE5izOZSa5586cEwh8zxjx8fgnvlnYWTm42MhJCSdaBqJO0TAy6+wpP5WTYcVKmYn2/yQU2kTt645S3snU8AIbfA0q; SignOnDefault=; PS_LASTSITE=http://ehr.xincheng.com:8000/psc/HR92PRD/; PS_TOKENEXPIRE=10_May_2021_05:44:19_GMT; AuthUser_LoginId=wangrui20; AuthUser_PasswordExpireDays=16; LRToken=cf93d7a73d0ae0a5dfec52af42dde3a457a5849dad86b7ff0b246e0e77438da718979f150f6f64e1c189fd72a0ea84f2f766a25611cfedb35012adb2a3d1b2e50a4488c43a6950b7439ba4932ad36561dbc10ce0fb4dbb5276e3a0a242f479384f7728cfa17fd67e99fb26b675bb4efdd1c6a79b0175498f3c664a12bffa981e; UserName-bpm-xincheng=E7296E12C23A1B8755C62F6534B2B1CD; UserName-bpm-xingcheng=E7296E12C23A1B8755C62F6534B2B1CD; AuthUser_AuthMAC="TV2m30emB7/NDBqECz5Dui26A359+N7I5S5oKh9+WAqJkgZ3BvoZesqsNdFZTUUmE2jYjoTe+qKZcY+fkN9sakde9yVybSklN0hCPcic/a+mQ9ptg0bbStEmzP/RfzuvYD76+vb6T63GhKZcQDm/CnkLeiKwTILY+8vVjvL3e+Q1aeuyuMJ8u43Fpyrcn6OJQ20Z9ntV1vu060NcMlCuDNhLz1L/zGLnXMdC5YYGtR5qUHcXT5/ROE+/dPnvERQqH+6NvUWKHf21I9dde2uV9u/p3AP7zNmxoGY7lzHjnUwn5xCpoCK8Aq+hUE+1ew/NxyuBXWfcCXkU3+9QLq3+vg=="; AuthUser_AuthNum="aS8tPtZ8NmnXGKdobTXZtF8OdhFNDkS3jPvfmsI+nWc3kwIXmAogQgMEX9+4cYCU35hVztbP6m5QwQPwKnKuMWgTP+YHGqL1ihDhLJ1owggI8u/xaAT9w4/GlSsXaxE/rbnb777OACsEgfZvbmqUM9JmKYLiYTxIph3KQexpkzJuyy1uTNULby6mYllxh/z8J++6Sdemkr52F/WfCiBlYhH/ta8A3oy+hoFlxXgJb9fodJzLzonmJdwVacH5+kAabIcNKS5wvtnOKtCqRZdgUm5ALuyxcYsn1lCzIQsua6ygidyLb3RnvP4TZSM99b2oQSgJaw4rdmAJjSCuNej1vw=="; AuthUser_AuthToken="TeotPXv6L0X6K2kQCBgFCB2J/j1FWXwZk4DWm5wQPirVvFYjr+TetlaLLX1vYTKi0ZWVNm3QcymP+iWGyoH1tUx/Ro+5ZncSQTZb1nNj7Z/tfC2e2d43y9SPQCbZGd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F3+4FTSVCi5T8Fh5IdD9Bgsz8xSzfurji3IED4Svcxc5PS6hdWNGWJ5z/WwY1FoVIbE8l91NyLLukjoCiduK/R5QwbjPssj8sOloaeWK1ZMGGRcc0lzzI9IYTzubnZj6cM++OdOWJGQ4seJyXw5CcwNWbzc7vxUOy6DWzPn9UDnIIkPEnJn2kkbq079LA5XxLy2DuDe2fWHhUbaYMuHtV6qPPZNcaMB2Q+P7eA3kNXd4Ox5YtLJUKUuravqBxei9S+EekI3kaxxqMHhqpgpIhGaVUSI+FfoKqQcyoev3cXcMa6eYNYYh57ZN+qzawF5kl9lpGdBw2lYTeGjS2gZcN+mdH2go1Ysser60rW8i2ysE45aXRGKLxZxWHvOd/5Ia+k2G3eVlQb91B29sFgOoOx4zeZUmQX3BGme4GrKpadZ0boWiyZLjpvoqbJPe1LWLf50ka2RetBkjIs8xWmgr0aCdFzQnLf78TwzqWDkUtEJ+bDwCl2UFBqji8p1/unvjD1t07Q0BcYw1anXy/O6F7ogAAAKCstGmC3j42D1EHiyA="; SAP_SESSIONID_S4P_800=vsSYkcZESgneVd-o9knk4IVX0yGyGxHro0wAUFat9HI%3d'
    }
    headers = {
        'sec-ch-ua': '" Not A;Brand";v="99", "Chromium";v="90", "Microsoft Edge";v="90"',
        'MaxDataServiceVersion': '2.0',
        'x-csrf-token': 'hVfLgVGewkoIMiwjmd5hTg==',
        'sec-ch-ua-mobile': '?0',
        'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36 Edg/90.0.818.49',
        'sap-cancel-on-close': 'true',
        'Content-Type': 'multipart/mixed;boundary=batch_5360-5f01-a363',
        'Accept': 'multipart/mixed',
        'sap-contextid-accept': 'header',
        'DataServiceVersion': '2.0',
        'SAP-PASSPORT': '2A54482A0300E600005A5352455F3032374E40312E302E30202020202020202020202020202020202000005341505F4532455F54415F5573657220202020202020202020202020202020206E74302D2D2D4C6973742D2D736D61727446696C7465724261722D62746E476F5F636C69636B5F3200055A5352455F3032374E40312E302E302020202020202020202020202020202020394239393545344344423437343137334137333843443143363932433437323120202000073380B8F1B60447BA8A4EDBE074CFCB040000000000000000000000000000000000000000000000E22A54482A',
        'Sec-Fetch-Site': 'same-origin',
        'Sec-Fetch-Mode': 'cors',
        'Sec-Fetch-Dest': 'empty',
        'cookie': 'UM_distinctid=178d9aeaf17645-0c2767b0ad2d76-18473f15-13c680-178d9aeaf1820; PS_DEVICEFEATURES=width:1680 height:1050 pixelratio:2 touch:0 geolocation:1 websockets:1 webworkers:1 datepicker:1 dtpicker:1 timepicker:1 dnd:1 sessionstorage:1 localstorage:1 history:1 canvas:1 svg:1 postmessage:1 hc:0 maf:0; fm-vip-lock={"ef6b891c87fa4227ba10a39f4a4d144f-1-0-0":15785696}; MYSAPSSO2=AjQxMDMBABhYAEMAMAAwADkAMQAyADAAMgAgACAAIAACAAY4ADAAMAADABBTADQAUAAgACAAIAAgACAABAAYMgAwADIAMQAwADUAMAA5ADEAMgAyADgABQAEAAAACAkAAjEA%2fwD9MIH6BgkqhkiG9w0BBwKggewwgekCAQExCzAJBgUrDgMCGgUAMAsGCSqGSIb3DQEHATGByTCBxgIBATAaMA4xDDAKBgNVBAMTA1M0UAIICiAgEhAIMwEwCQYFKw4DAhoFAKBdMBgGCSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTIxMDUwOTEyMjgwN1owIwYJKoZIhvcNAQkEMRYEFHe9erXCOai8xwlCws8WsQ22GqKcMAkGByqGSM44BAMEMDAuAhUAh4neOV7TshVSRbZa0coFGbRRNNICFQDm9ZTLCJvFlzSfHKbXNYm81oMeiQ%3d%3d; sap-usercontext=sap-language=ZH&sap-client=800; sso_user=7CjToxIA1QqCSFP9+BDEYHRxS7cp1WxKwWUxJZ9xFy8KSWVQSTPqeA==; sap-login-XSRF_S4P=20210510053453-S50Gv2dkTWVE43nMKq4aew%3d%3d; SPNegoTokenRequested=2021-05-10%2005%3a35%3a20; sap-ssolist=O3I9c2FwLXM0LWFwMl9TNFBfMDBfODAwXzMyQTdGMjk0QTE2OUQyQTY1RUY0QzVGNTVBRTZENUY4NDRBNDk5MTk7cj1zYXAtczQtYXAzX1M0UF8wMF84MDBfMzJBN0YyOTRBMTY5RDJBNjVFRjRDNUY1NUFFNkQ1Rjg0NEE0OTkxOTtyPXNhcC1zNC1hcDRfUzRQXzAwXzgwMF8zMkE3RjI5NEExNjlEMkE2NUVGNEM1RjU1QUU2RDVGODQ0QTQ5OTE5O3I9c2FwLXM0LWFwMV9TNFBfMDBfODAwXzMyQTdGMjk0QTE2OUQyQTY1RUY0QzVGNTVBRTZENUY4NDRBNDk5MTk%3d; ehr-8000-PORTAL-PSJSESSIONID=K7NUzfuOUAbbTYQW7mvWcLiW2cb_8NCv!2043754032; ExpirePage=http://ehr.xincheng.com:8000/psc/HR92PRD/; PS_LOGINLIST=http://ehr.xincheng.com:8000/HR92PRD; PS_TOKEN=qwAAAAQDAgEBAAAAvAIAAAAAAAAsAAAABABTaGRyAk4Acwg4AC4AMQAwABQfjKdSpIOPIZRv0cq9qK52pBv3OGsAAAAFAFNkYXRhX3icHYk7DkBQEEXPQ5QK+3jiG28FohRUGlGJRkHE5izOZSa5586cEwh8zxjx8fgnvlnYWTm42MhJCSdaBqJO0TAy6+wpP5WTYcVKmYn2/yQU2kTt645S3snU8AIbfA0q; SignOnDefault=; PS_LASTSITE=http://ehr.xincheng.com:8000/psc/HR92PRD/; PS_TOKENEXPIRE=10_May_2021_05:44:19_GMT; AuthUser_LoginId=wangrui20; AuthUser_PasswordExpireDays=16; LRToken=cf93d7a73d0ae0a5dfec52af42dde3a457a5849dad86b7ff0b246e0e77438da718979f150f6f64e1c189fd72a0ea84f2f766a25611cfedb35012adb2a3d1b2e50a4488c43a6950b7439ba4932ad36561dbc10ce0fb4dbb5276e3a0a242f479384f7728cfa17fd67e99fb26b675bb4efdd1c6a79b0175498f3c664a12bffa981e; UserName-bpm-xincheng=E7296E12C23A1B8755C62F6534B2B1CD; UserName-bpm-xingcheng=E7296E12C23A1B8755C62F6534B2B1CD; AuthUser_AuthMAC="TV2m30emB7/NDBqECz5Dui26A359+N7I5S5oKh9+WAqJkgZ3BvoZesqsNdFZTUUmE2jYjoTe+qKZcY+fkN9sakde9yVybSklN0hCPcic/a+mQ9ptg0bbStEmzP/RfzuvYD76+vb6T63GhKZcQDm/CnkLeiKwTILY+8vVjvL3e+Q1aeuyuMJ8u43Fpyrcn6OJQ20Z9ntV1vu060NcMlCuDNhLz1L/zGLnXMdC5YYGtR5qUHcXT5/ROE+/dPnvERQqH+6NvUWKHf21I9dde2uV9u/p3AP7zNmxoGY7lzHjnUwn5xCpoCK8Aq+hUE+1ew/NxyuBXWfcCXkU3+9QLq3+vg=="; AuthUser_AuthNum="aS8tPtZ8NmnXGKdobTXZtF8OdhFNDkS3jPvfmsI+nWc3kwIXmAogQgMEX9+4cYCU35hVztbP6m5QwQPwKnKuMWgTP+YHGqL1ihDhLJ1owggI8u/xaAT9w4/GlSsXaxE/rbnb777OACsEgfZvbmqUM9JmKYLiYTxIph3KQexpkzJuyy1uTNULby6mYllxh/z8J++6Sdemkr52F/WfCiBlYhH/ta8A3oy+hoFlxXgJb9fodJzLzonmJdwVacH5+kAabIcNKS5wvtnOKtCqRZdgUm5ALuyxcYsn1lCzIQsua6ygidyLb3RnvP4TZSM99b2oQSgJaw4rdmAJjSCuNej1vw=="; AuthUser_AuthToken="TeotPXv6L0X6K2kQCBgFCB2J/j1FWXwZk4DWm5wQPirVvFYjr+TetlaLLX1vYTKi0ZWVNm3QcymP+iWGyoH1tUx/Ro+5ZncSQTZb1nNj7Z/tfC2e2d43y9SPQCbZGdpHhuQQ4ZiokIaKmeBx4jbYP89o9SQid2SFZx5x5nGqEsFA0sXXWAarCwXqRJbjavvgtbFlVwQi5/HKZ8YOyU3fBaH1rLsm3ISng2tINN53YAWj6a8AYz1yN0cjJIq6J3VJqELxv+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JGQ4seJyXw5CcwNWbzc7vxUOy6DWzPn9UDnIIkPEnJn2kkbq079LA5XxLy2DuDe2fWHhUbaYMuHtV6qPPZNcaMB2Q+P7eA3kNXd4Ox5YtLJUKUuravqBxei9S+EekI3kaxxqMHhqpgpIhGaVUSI+FfoKqQcyoev3cXcMa6eYNYYh57ZN+qzawF5kl9lpGdBw2lYTeGjS2gZcN+mdH2go1Ysser60rW8i2ysE45aXRGKLxZxWHvOd/5Ia+k2G3eVlQb91B29sFgOoOx4zeZUmQX3BGme4GrKpadZ0boWiyZLjpvoqbJPe1LWLf50ka2RetBkjIs8xWmgr0aCdFzQnLf78TwzqWDkUtEJ+bDwCl2UFBqji8p1/unvjD1t07Q0BcYw1anXy/O6F7ogAAAKCstGmC3j42D1EHiyA="; SAP_SESSIONID_S4P_800=vsSYkcZESgneVd-o9knk4IVX0yGyGxHro0wAUFat9HI%3d'

    }

    response = seazen_session().post(url,headers=headers, data=payload)
    # start = 'dataserviceversion: 2.0'
    # end = '}}'
    # start2 = r"['\r\n\r\n"
    # end2 = r"']"
    # datas = []
    # rule = re.compile(start+'(.*?)'+end,re.S)
    # data = rule.findall(response.text)
    # datas.append(data)
    print(response.text)


if __name__ == '__main__':
    # seazen_session()
    contract_warning()
